package hottargui.view;

import hottargui.standard.*;
import hottargui.framework.*;
import minidraw.framework.*;

import javax.swing.JTextField;

public class GuiFactory implements Factory {

	Game game;
	TarguiFactory factory;

	public GuiFactory(TarguiFactory targuiFactory) {
		System.out.println(minidraw.RevisionInfo.RevisionString);
		factory = targuiFactory;
		game = new StandardGame(targuiFactory);
	}

	public Game getGame() {
		return game;
	}

	public DrawingView createDrawingView(DrawingEditor editor) {
		return new BoardView(editor, game);
	}

	public Drawing createDrawing(DrawingEditor editor) {
		TarguiDrawing d = new TarguiDrawing(editor, game, factory.getGuiToolFactory());
		game.addGameListener(d);
		return d;
	}

	public JTextField createStatusField(DrawingEditor editor) {
		return null;
	}

}
